<script type="text/javascript">
$(document).ready(function(){
	$("#save").on("click",function(){
		var fjd_id = $("#companyId").find("option:selected").val();
		var name = $("input[name='name']").val();
		var introduction = $("textarea[name='introduction']").val();
		var code = $("input[name='code']").val();
		var address = $("input[name='address']").val();
		var liable_peoper = $("input[name='liable_peoper']").val();
		var grade = $("input[name='grade']").val();
		$.post("${path}/company/add",{
			name:name,
			introduction:introduction,
			fjd_id:fjd_id,
			code:code,
			address:address,
			liable_peoper:liable_peoper,
			grade:grade
		},function(data){
			if(data.success){
				window.location.href="${path}/company/list";
			}
		});
	})
});
</script>
<div>
	单位名称:<input name="name"><br/>
	单位简介:<textarea name="introduction"></textarea><br/>
	单位代码:<input name="code"><br/>
	单位级别:<input name="grade"><br/>
	上级单位:
	<select id="companyId" name="">
	     <option value=" " >请选择</option>
	     #foreach ($company in $list)
	        <option value="${company.id}"> ${company.name}</option>
		  #end 
	</select><br/>
	单位地址:<input name="address"><br/>
	单位负责人:<input name="liable_peoper"><br/>
	<button id="save">保存</button>
</div>